<html>
    <head>
    </head>
    <body>
    	<!-- Google Analytics -->
    	<script type="text/javascript">
		  var _gaq = _gaq || [];
		  _gaq.push(['_setAccount', 'UA-19526391-5']);
		  _gaq.push(['_trackPageview']);
		
		  (function() {
		    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
		    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
		    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
		  })();
		
		</script>
        <!-- Facebook JS SDK -->
        <div id="fb-root"></div>
        <script>
              window.fbAsyncInit = function() {
                  FB.init({appId: '140926039267506', status: true, cookie: true,
                      logging : true, xfbml: true});
                  FB.Canvas.setSize();
                  FB.getLoginStatus(function(response) {
                      if (response.session) {
                          // logged in and connected user, someone you know
                          // FB.XFBML.parse($("#invite_box")[0]);
                          //top.location.href="http://apps.facebook.com/lucky_money/main?{{=request_string}}";
                          top.location.href="http://apps.facebook.com/lucky_money/main";
                          } else {
                          // no user session available, someone you dont know
                          //alert("I don't know you. Gonna let you in first.");
                          top.location.href="https://graph.facebook.com/oauth/authorize?scope=publish_stream&redirect_uri=http://apps.facebook.com/lucky_money/&client_id=140926039267506";
                      }
                  });
                };
            (function() {
                var e = document.createElement('script'); 
                e.async = true;
                e.src = document.location.protocol +
                        '//connect.facebook.net/en_US/all.js';
                            document.getElementById('fb-root').appendChild(e);
                    }());
        </script>
    </body>
</html>
